﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<script type="text/javascript" src="js/jquery.js"></script>

<script type="text/javascript">
    function JudgeUserName() {
        $.ajax({
            type: "GET",
            url: "AjaxUserInfoModify.aspx",
            dataType: "html",
            data: "userName=" + $("#txtName").val(),
            beforeSend: function(XMLHttpRequest) {
                $("#showResult").text("正在查询");
                //Pause(this,100000);
            },
            success: function(msg) {
                $("#showResult").html(msg);
                $("#showResult").css("color", "red");
            },
            complete: function(XMLHttpRequest, textStatus) {
                //隐藏正在查询图片
            },
            error: function() {
                //错误处理
            }
        });
    }

</script>

<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <input id="txtName" type="text"  onblur ="JudgeUserName();" /><input type="button" value="查看用户名是否存在" id="btn"
            onclick="JudgeUserName();" />
        <span id="showResult" style="float: left">
        </span>
    </div>
    </form>
</body>
</html>
